package com.swak.frame.catchlog.spring.configuration;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import com.swak.frame.catchlog.CatchLogAspect;

/**
 * CatchLogAutoConfiguration ClassName: CatchLogAutoConfiguration.java
 * 
 * @author colley.ma
 * @date 2021年3月19日 下午3:31:58
 */
@Configuration
@EnableAspectJAutoProxy
public class CatchLogAutoConfiguration {

	@Bean
	@ConditionalOnMissingBean(CatchLogAspect.class)
	public CatchLogAspect initCatchLogAspect() {
		CatchLogAspect catchLogAspect = new CatchLogAspect();
		catchLogAspect.setOrder(10);
		return catchLogAspect;
	}
}
